package scalapackage.testspark

/**
  * Created by Germmy on 2018/5/19.
  */
object TestIp2Long {
  def main(args: Array[String]) {

    val ipArray = Array("221.207.13.53", "222.17.208.6", "220.182.46.14", "61.153.244.143", "222.17.208.6", "220.182.46.14", "61.153.244.143")
    val ipArray2 = Array(("221.207.13.53", "青海西宁"), ("222.17.208.6", "海南海口"), ("220.182.46.14", "西藏拉萨"),
      ("61.153.244.143", "浙江丽水"), ("222.17.208.6", "海南海口"),
      ("220.182.46.14", "西藏拉萨"), ("61.153.244.143", "浙江丽水"),("60.160.128.69","云南玉溪"))
      ipArray2.map(x => {
      println(x._2+"==="+x._1 + "===" + TestIpCount.ip2Long(x._1))
    })

    //    ipArray.map(TestIpCount.ip2Long(_))

  }
}
